/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.td.engine.entity;

import java.lang.Float;
import java.util.Random;

/**
 *
 * @author Администратор
 */
public class MonsterClass extends EntityClass {
    
    private float maxHealth;
    private float speed;
    private float size;
    
    public MonsterClass(ParameterMap parameterMap) {
        super(parameterMap);
        maxHealth = parameterMap.getValue("maxHealth", Float.class);
        speed = parameterMap.getValue("speed", Float.class);
        size = parameterMap.getValue("size", Float.class);
    }
    
    public float getMaxHealth() {
        return maxHealth;
    }
    
    public float getSpeed() {
        return speed;
    }

    public float getSize() {
        return size;
    }

    public static MonsterClass getRandom() {
        Random rnd = new Random();
        ParameterMap parameterMap = new ParameterMap();
        parameterMap.putValue("size", 32f);
        parameterMap.putValue("speed", rnd.nextInt(200) + 55f);
        parameterMap.putValue("maxHealth", rnd.nextInt(1000) + 150f);
        parameterMap.putValue("assetFile", "faces/" + Integer.toString(rnd.nextInt(16) + 1));
        return (new MonsterClass(parameterMap));
    }
}
